

#ifndef __GRASSINSTANCEGENERATOR_H__
#define __GRASSINSTANCEGENERATOR_H__

#include <export.h>
#include <gfx/iinstancedmesh.h>
#include <math/boundingbox.h>

/**
 * \addtogroup graphics
 * @{
 */
/**
 * @brief Generator for creating multiple instance of grass meshes.
 */
class CE_API ceGrassInstanceGenerator : public iInstanceGenerator
{
  CE_OBJECT
private:
	unsigned		_num;
  ceVector3f*	_vertices;
	unsigned		_c;

  ceBoundingBox	_bbox;

public:
  ceGrassInstanceGenerator (unsigned c = 0);

  void SetVertices (ceVector3f* vertices, unsigned num);

  virtual void Generate (const ceRenderEnvironment&			env,
                         iDevice*                       device,
                         std::vector<ceInstancedData>&	data,
												 unsigned&											num, 
												 unsigned&											maxNum);
};

/** @} */

#endif /* ! __GRASSINSTANCEGENERATOR_H__ */

